package cb.model;

import gameFramework.model.GameEngine;
import gameFramework.model.entites.BonusEntity;
import gameFramework.model.entites.ControllableEntity;
import gameFramework.model.entites.MovableEntity;
import gameFramework.model.entites.StaticEntity;

import java.awt.Dimension;

/**
 * 
 * @author Thomas Hoarau
 *
 */
public class CbBrick extends StaticEntity {

	public CbBrick(GameEngine ge) {
		super(ge);
		this.size = new Dimension(ge.getCellSize() * 3, ge.getCellSize() * 2);
	}

	/**
	 * @see gameFramework.model.entites.StaticEntity#collide(gameFramework.model.entites.BonusEntity)
	 */
	public void collide(BonusEntity bonus) {
	}

	/**
	 * @see gameFramework.model.entites.Entity#collide(gameFramework.model.entites.MovableEntity)
	 */
	public void collide(MovableEntity ball) {
		if (ball.getPlayer() != null)
			ball.getPlayer().incScore(10);
		
		this.gameEngine.remove(this);
	}

	@Override
	public void collide(ControllableEntity arg0) {
	}
}
